]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Call RegisterDisplay once UI has initialized
authorJoan Torres Lopez <joantolo@redhat.com>
Tue, 3 Feb 2026 13:43:43 +0000 (14:43 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 4 Feb 2026 22:32:10 +0000 (22:32 +0000)
RegisterDisplay is called to signal that graphics have settled,
which allows GDM to terminate pending greeters and plymouth.

Previously, RegisterSession was used for both recording the login
and terminating greeters. This caused a race condition where the
new user shell was setting up while the greeter was tearing down,
leading to configuration conflicts during the asynchronous handoff.

By splitting into RegisterSession (called early to record login) and
RegisterDisplay (called after graphics settle), the greeter teardown
is delayed until the new session has completed its initial modeset.

Fixes: 32a01330 ("main: Register session with GDM on startup")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4057>

js/misc/loginManager.js
js/ui/main.js

index 5b38257484a61b19b5e778b4b869d44f1d9bf526..a66ebed037d602b9064dbb577a73980cc4904971 100644 (file)
@@ -71,6 +71,24 @@ export async function registerSessionWithGDM() {
     }
 }
 
+export async function registerDisplayWithGDM() {
+    log('Registering display with GDM');
+    try {
+        await Gio.DBus.system.call(
+            'org.gnome.DisplayManager',
+            '/org/gnome/DisplayManager/Manager',
+            'org.gnome.DisplayManager.Manager',
+            'RegisterDisplay',
+            null, null,
+            Gio.DBusCallFlags.NONE, -1, null);
+    } catch (e) {
+        if (!e.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD))
+            log(`Error registering display with GDM: ${e.message}`);
+        else
+            log('Not calling RegisterDisplay(): method not exported, GDM too old?');
+    }
+}
+
 let _loginManager = null;
 
 /**
index 1b917f988186dd39d186dfb1e85fc4babad4e471..f485e7b624384ce4d2707dbc7f3049101b3948e1 100644 (file)
@@ -370,6 +370,8 @@ async function _initializeUI() {
             sessionMode.currentMode !== 'initial-setup')
             _handleLockScreenWarning();
 
+        LoginManager.registerDisplayWithGDM();
+
         if (perfModule) {
             const perfOutput = GLib.getenv('SHELL_PERF_OUTPUT');
             Scripting.runPerfScript(perfModule, perfOutput);